import { createApp } from "vue"
import { pinia } from "@/stores"

import App from "./App.vue"
import router from "./router"
import "./styles/transition.scss"
import UI from '@/core/install_ui'
import { setupI18n } from '@/lang';

import '@/assets/iconfont/iconfont.js';

const app = createApp(App);
import "./styles/main.scss"


app
  .use(pinia)
  .use(router)
  .use(UI)
  .use(setupI18n)
  .mount("#app")

app.config.errorHandler = (err, instance, info) => {
  /** 方法库后期封装 */
  console.error('全局拦截-报错信息：', err)
  console.error('全局拦截-报错信息：', instance)
  console.error('全局拦截-报错类型：', info)
}

// const style = document.createElement("style");
// style.innerText = ":root{--el-color-primary:red}";
// document.head.appendChild(style);